﻿using System;

namespace Ewk.Math.ComputationTypes
{
    /// <summary>
    /// Interface for factories of <see cref="Computable{T}"/> instances.
    /// </summary>
    /// <typeparam name="T">The <see cref="Type"/> of the internal value of the <see cref="Computable{T}"/>.</typeparam>
    public interface IComputableFactory<T> where T : struct, IComparable, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
    {
        /// <summary>
        /// A <see cref="Computable{T}"/> representation of zero.
        /// </summary>
        Computable<T> Zero { get; }

        /// <summary>
        /// A <see cref="Computable{T}"/> representation of epsilon.
        /// </summary>
        Computable<T> Epsilon { get; }

        /// <summary>
        /// A <see cref="Computable{T}"/> representation of one.
        /// </summary>
        Computable<T> One { get; }

        /// <summary>
        /// The minimum value of the <see cref="Computable{T}"/>.
        /// </summary>
        Computable<T> MinValue { get; }

        /// <summary>
        /// The maximum value of the <see cref="Computable{T}"/>.
        /// </summary>
        Computable<T> MaxValue { get; }

        /// <summary>
        /// Creates a <see cref="Computable{T}"/> that represents the specified value.
        /// </summary>
        /// <param name="value">The value to create a <see cref="Computable{T}"/> with.</param>
        /// <returns>A <see cref="Computable{T}"/> that represents the specified value.</returns>
        Computable<T> Create(T value);
    }
}